package com.lzx.qrcode.controller;

import com.lzx.qrcode.utils.QrCodeUtil;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/qrCode")
public class QrCodeController {

    @GetMapping("/createQrCode/{content}")
    public String qrCode(@PathVariable String content) {
        System.out.println(content);
        //生成二维码
        QrCodeUtil qrCodeUtil = new QrCodeUtil();
        return qrCodeUtil.getBase64QRCode(content);
    }

    @GetMapping("/test")
    public String test(){
        return "成功";
    }
}
